﻿function getdate()
        {
        var mydate=new Date();
        var hours=mydate.getHours(); 
        var minutes=mydate.getMinutes();
        var seconds=mydate.getSeconds(); 
        
        if (hours==0) hours=12; 
        if (minutes<=9) minutes="0"+minutes;
        if (seconds<=9) seconds="0"+seconds;
        var cdate=hours+":"+minutes+":"+seconds;
        document.getElementById("clock").innerHTML=cdate;
        }
        setInterval(getdate,1000);